package com.example.testanimation.valueanimation;

import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import com.nova.scenic.projectlibs.util.BaseActivity;

/**
 * Created by scenic on 2015/1/11.
 */
public class ValueAnimationActivity extends BaseActivity {
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

//        ValueAnimator animator = ValueAnimator.ofInt(0, 100);
//        animator.setDuration(15000);
//        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
//            @Override
//            public void onAnimationUpdate(ValueAnimator valueAnimator) {
//                Integer value = (Integer) valueAnimator.getAnimatedValue();
//                System.out.println(value);
//            }
//        });
//        animator.start();



        ValueAnimator animator = ValueAnimator.ofObject(new TypeEvaluator() {
            @Override
            public Object evaluate(float fraction, Object startValue, Object endValue) {
                return null;
            }
        },1,20);



    }
}